package com.alm.web.controller.alm.devimg;

import com.alm.common.core.domain.AjaxResult;
import com.alm.handle.core.domain.entity.rq.ImgModelRq;
import com.alm.handle.service.SysImgService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 设备图片服务前端控制器
 *
 * @author 詹泽峰
 * @date 2024/08/07 16:42
 */
@RestController
@RequestMapping("/alm/dev_img")
public class AlmDevImgController {

    @Resource
    private SysImgService sysImgService;

    @PreAuthorize("@ss.hasRole('common')")
    @PostMapping("/sendImg")
    public AjaxResult sendImgData(@RequestBody ImgModelRq rq) {
        return sysImgService.sendFirstData(rq);
    }
}
